var _a;
window.onload = function () {
    var isChecked = window.localStorage.getItem('isChecked');
    if (!isChecked) {
        window.localStorage.setItem('isChecked', 0);
    }
    if (isChecked) {
        document.querySelector('#box').checked = true;
        document.querySelector('#status').innerHTML = '是';
    }
    else {
        document.querySelector('#box').checked = false;
        document.querySelector('#status').innerHTML = '否';
    }
};
var isopen = function () {
    var isChecked = window.localStorage.getItem('isChecked');
    if (isChecked == 0) {
        window.localStorage.setItem('isChecked', 1);
        document.querySelector('#status').innerHTML = '是';
    }
    else {
        window.localStorage.setItem('isChecked', 0);
        document.querySelector('#status').innerHTML = '否';
    }
    // alert(window.localStorage.getItem('isChecked'));
};
(_a = document.querySelector('#box')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', isopen);
